package com.test.springai.service;

import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.springframework.ai.document.Document;

/**
 * Created with IntelliJ IDEA.
 *
 * @description:
 * @author: liuziyang
 * @since: 9/3/25 2:25 PM
 * @modifiedBy:
 * @version: 1.0
 */
public interface MultiQueryExpander {
  /**
   * Generate sub queries completable future.
   *
   * @param originalQuery the original query
   * @return the completable future
   */
  CompletableFuture<List<String>> generateSubQueries(String originalQuery);

  /**
   * Retrieve documents completable future.
   *
   * @param subQueries the sub queries
   * @return the completable future
   */
  CompletableFuture<List<Document>> retrieveDocuments(List<String> subQueries);

  /**
   * Deduplicate documents list.
   *
   * @param documents the documents
   * @return the list
   */
  List<Document> deduplicateDocuments(List<Document> documents);
}
